<template>
  <div>
    <el-table :data="products" border stripe>
      <el-table-column label="序号">
        <template #default="{ $index }">
          <el-radio v-model="checkIndex" :label="$index" @change="handlerChangeIndex($index)">&nbsp;</el-radio>
        </template>
      </el-table-column>
      <el-table-column label="名称" prop="name"></el-table-column>
      <el-table-column label="是否赠与">
        <template #default="{ row }">
          <el-radio-group v-model="row.isOk">
            <el-radio  label="是"></el-radio>
            <el-radio  label="否"></el-radio>
          </el-radio-group>
        </template>
      </el-table-column>
      <el-table-column label="数量">
        <template #default="{ row }">
          <el-input v-model="row.num"></el-input>
        </template>
      </el-table-column>
    </el-table>
    
  </div>
</template>

<script>
  export default {
    data() {
      return {
        checkIndex: null,
        products: [
          {id: 1, name: '茅台', isOk: null, num: ''},
          {id: 2, name: '五粮液', isOk: null, num: ''},
          {id: 3, name: '剑南春', isOk: null, num: ''}
        ]
      }
    },
    methods: {
      handlerChangeIndex() {
        console.log(123)
      }
    },
  }
</script>

<style lang="scss" scoped>

</style>